Pagination

interface Pagination : ClosedRange<Int>

Base interface of pagination

If you want to request something, you should use SimplePagination. If you need to return some result including pagination - PaginationResult

Functions

Link copied to clipboard
open operator fun contains(value: Int): Boolean
Link copied to clipboard
open fun isEmpty(): Boolean

Properties

Link copied to clipboard
open override val endInclusive: Int
Link copied to clipboard
abstract val page: Int

Started with 0. Number of page inside of pagination. Offset can be calculated as page * size

Link copied to clipboard
abstract val size: Int

Can be 0, but can't be < 0 Size of current page. Offset can be calculated as page * size

Link copied to clipboard
open override val start: Int

Inheritors

PaginationResult
Link copied to clipboard
SimplePagination
Link copied to clipboard

Extensions

Link copied to clipboard
val Pagination.asUrlQueryArrayParts: Array<Pair<String, String>>
val Pagination.asUrlQueryArrayParts: Array<Pair<String, String>>
val Pagination.asUrlQueryArrayParts: Array<Pair<String, String>>
Link copied to clipboard
val Pagination.asUrlQueryParts: Map<String, String>
val Pagination.asUrlQueryParts: Map<String, String>
val Pagination.asUrlQueryParts: Map<String, String>
Link copied to clipboard
val Pagination.firstIndex: Int

First number in index of objects. It can be used as offset for databases or other data sources

val Pagination.firstIndex: Int

First number in index of objects. It can be used as offset for databases or other data sources

val Pagination.firstIndex: Int

First number in index of objects. It can be used as offset for databases or other data sources

intersect
Link copied to clipboard
fun Pagination.intersect(other: Pagination): Pagination?
fun Pagination.intersect(other: Pagination): Pagination?
fun Pagination.intersect(other: Pagination): Pagination?
Link copied to clipboard
val Pagination.isFirstPage: Boolean

Logical shortcut for comparison that page is 0

val Pagination.isFirstPage: Boolean

Logical shortcut for comparison that page is 0

val Pagination.isFirstPage: Boolean

Logical shortcut for comparison that page is 0

Link copied to clipboard
val Pagination.lastIndex: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

val Pagination.lastIndex: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

val Pagination.lastIndex: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

Link copied to clipboard
val Pagination.lastIndexExclusive: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

val Pagination.lastIndexExclusive: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

val Pagination.lastIndexExclusive: Int

Last number in index of objects. In fact, one Pagination object represent data in next range:

Link copied to clipboard
fun Pagination.limitClause(): String
nextPage
Link copied to clipboard
inline fun Pagination.nextPage(): SimplePagination
inline fun Pagination.nextPage(): SimplePagination
inline fun Pagination.nextPage(): SimplePagination
optionallyReverse
Link copied to clipboard
fun Pagination.optionallyReverse(objectsCount: Int, reverse: Boolean): Pagination
fun Pagination.optionallyReverse(objectsCount: Long, reverse: Boolean): Pagination
fun Pagination.optionallyReverse(objectsCount: Int, reverse: Boolean): Pagination
fun Pagination.optionallyReverse(objectsCount: Long, reverse: Boolean): Pagination
fun Pagination.optionallyReverse(objectsCount: Int, reverse: Boolean): Pagination
fun Pagination.optionallyReverse(objectsCount: Long, reverse: Boolean): Pagination
reverse
Link copied to clipboard
fun Pagination.reverse(datasetSize: Long): SimplePagination

Example:

fun Pagination.reverse(objectsCount: Int): SimplePagination

Shortcut for reverse

fun Pagination.reverse(datasetSize: Long): SimplePagination

Example:

fun Pagination.reverse(objectsCount: Int): SimplePagination

Shortcut for reverse

fun Pagination.reverse(datasetSize: Long): SimplePagination

Example:

fun Pagination.reverse(objectsCount: Int): SimplePagination

Shortcut for reverse